from __future__ import annotations

from typing import List, Tuple


def plot_stress_sag(points: List[Tuple[float, float]]):
    """简单绘图：应力-弧垂曲线（需要matplotlib）。"""

    try:
        import matplotlib.pyplot as plt
    except Exception:
        raise RuntimeError("需要安装 matplotlib 才能绘图")
    x = [p[0] for p in points]
    y = [p[1] for p in points]
    plt.figure()
    plt.plot(x, y, marker='o')
    plt.xlabel('Tension (kN)')
    plt.ylabel('Sag (m)')
    plt.grid(True)
    return plt


